package service;

import org.restlet.resource.ClientResource;

import android.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class PostoActivity extends Activity {

	private PostoResource resource;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		System.setProperty("java.net.preferIPv6Addresses", "false");
		super.onCreate(savedInstanceState);
		// Initialize the resource proxy.
		ClientResource cr = new ClientResource(
				"http://restlet-example-serialization.appspot.com/contacts/123");
		resource = cr.wrap(PostoResource.class);

	}
	
	
	public void cadastrarPosto(){
		
	}
	
	/**
	 * Returns the string value of a field given its id.
	 * 
	 * @param fieldId
	 *            The id of the field.
	 * @return The string value of the field.
	 */
	private String getStringValue(int fieldId) {
		String result = null;
		View v = findViewById(fieldId);
		if (v != null) {
			CharSequence value = ((TextView) v).getText();
			if (value != null) {
				result = value.toString();
			}
		}
		return result;
	}
}